-
Notifications
You must be signed in to change notification settings - Fork 745
/
BusinessController.cs
70 lines (62 loc) · 2.36 KB
/
BusinessController.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace Dnn.ExportImport.Components.Controllers
{
using System;
using DotNetNuke.Entities.Modules;
/// <inheritdoc/>
public class BusinessController : IUpgradeable
{
/// <inheritdoc/>
public string UpgradeModule(string version)
{
try
{
switch (version)
{
case "09.01.00":
// AddNewLogTypes(); // moved to SQL migration script
break;
}
return "Success";
}
catch (Exception)
{
return "Failed";
}
}
/*
private static void AddNewLogTypes()
{
var logTypeInfo = new LogTypeInfo
{
LogTypeKey = Constants.LogTypeSiteExport,
LogTypeFriendlyName = "Site Export Request",
LogTypeDescription = "",
LogTypeCSSClass = "GeneralAdminOperation",
LogTypeOwner = "DotNetNuke.Logging.EventLogType"
};
LogController.Instance.AddLogType(logTypeInfo);
logTypeInfo.LogTypeKey = Constants.LogTypeSiteImport;
logTypeInfo.LogTypeFriendlyName = "Site Import Request";
LogController.Instance.AddLogType(logTypeInfo);
var logTypeConf = new LogTypeConfigInfo
{
LoggingIsActive = true,
LogTypeKey = Constants.LogTypeSiteExport,
KeepMostRecent = "50",
NotificationThreshold = 1,
NotificationThresholdTime = 1,
NotificationThresholdTimeType = LogTypeConfigInfo.NotificationThresholdTimeTypes.Minutes,
MailFromAddress = Null.NullString,
MailToAddress = Null.NullString,
LogTypePortalID = "*"
};
LogController.Instance.AddLogTypeConfigInfo(logTypeConf);
logTypeConf.LogTypeKey = Constants.LogTypeSiteImport;
LogController.Instance.AddLogTypeConfigInfo(logTypeConf);
}
*/
}
}